package com.insta.formation.calendar.service;

import java.util.Date;

import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;

import com.insta.formation.calendar.model.Person;

/**
 * Interface
 * 
 * @author julien
 * 
 */
@WebService
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
public interface IUserService
{
	/**
	 * 	Create a new user
	 * 
	 * @param email
	 * @param firstName
	 * @param lastName
	 * @return
	 */
	public boolean createUser(String email, String firstName, String lastName);
	
	/**
	 * 	Update a user
	 * 
	 * @param email - email of the user
	 * @param firstName - firstname of the user
	 * @param lastName - lastname of the user
	 * @return true if create, otherwise false
	 */
	public boolean updateUser(String email, String firstName, String lastName);
	
	/**
	 * 	Delete a user
	 * 
	 * @param email - email of the user
	 * @return
	 */
	public boolean deleteUser(String email);
	
	/**
	 * 	Create a new calendar
	 * 
	 * @param emailOwner - email of the owner
	 * @param calendarName - name of the calendar
	 * @return
	 */
	public boolean createCalendar(String emailOwner, String calendarName);
	
	/**
	 * 	Update a event
	 * 
	 * @param emailOwner - email of the owner
	 * @param calendarName - name of the calendar
	 * @param eventName - name of the Event
	 * @param newEventName - new name of the Event
	 * @param startDate
	 * @param endDate
	 * @return
	 */
	public boolean updateEvent(String emailOwner, String calendarName, String eventName, String newEventName, Date startDate, Date endDate);
	
	/**
	 * 	Create a new event
	 * 
	 * @param emailOwner - email of the owner
	 * @param calendarName - name of the calendar
	 * @param nameEvent - name of the event
	 * @param startDate 
	 * @param endDate
	 * @return
	 */
	public boolean createEvent(String emailOwner, String calendarName, String nameEvent, Date startDate, Date endDate);
	
	/**
	 * 	Delete a event
	 * 
	 * @param emailOwner - email of the owner
	 * @param calendarName - name of the calendar
	 * @param nameEvent - name of the event
	 * @return
	 */
	public boolean deleteEvent(String emailOwner, String calendarName, String nameEvent);
	
	/**
	 * 	Add a guest of the event
	 * 
	 * @param emailOwner - email of the owner
	 * @param calendarName - name of the calendar
	 * @param nameEvent - name of the event
	 * @param emailGuest - email of the guest
	 * @return
	 */
	public boolean addEventGuest(String emailOwner, String calendarName, String nameEvent, String emailGuest);
	
	/**
	 * 	Delete a guest of the event
	 * 
	 * 
	 * @param emailOwner - email of the owner
	 * @param calendarName - name of the calendar
	 * @param nameEvent - name of the event
	 * @param emailGuest - email of the guest
	 * @return
	 */
	public boolean deleteEventGuest(String emailOwner, String calendarName, String nameEvent, String emailGuest);
}
